package com.example.blockingqueue.blockingqueueconfig.linkedqueue;

import com.example.blockingqueue.controller.Order;
import com.example.blockingqueue.controller.Task;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.LinkedBlockingQueue;

/**
 * @ClassName LinkedQueueConfig
 * @Description
 * @Author huyingliang
 * @Date 2024-02-05 10:37
 */
@Configuration
public class LinkedQueueConfig {
    @Bean(name = "linkedQueue4Order")
    public LinkedBlockingQueue<Order> linkedQueue4Order() {
        return new LinkedBlockingQueue<>();
    }
    @Bean(name = "linkedQueue4Task")
    public LinkedBlockingQueue<Task> linkedQueue4Task() {
        return new LinkedBlockingQueue<>();
    }
}
